<template>
  <div :draggable='draggable' :class="[dragableCss, uiCss]" :style="uiStyle" :id="myId" :data-type="uiconfig.type"
       :data-isContainer="true"
       :data-pageid="pageid">
    <template v-for="(item, index) in uiconfig.items" :key="index">
      <UIBase :is-readonly="myIsReadonly" :is-lock="myIsLock" :uiconfig="item" :pageid="pageid"></UIBase>
    </template>
  </div>
</template>

<script lang="ts">
import UIBase from '@/components/ui/UIBase.vue'
import Container from '@/components/ui/js/Container'
import { useStore } from 'vuex'
import { onMounted } from 'vue'

export default {
  name: 'Bootstrap_Container',
  components: { UIBase },
  props: {
    uiVersion: String,
    uiconfig: Object,
    isLock: Boolean,
    isReadonly: Boolean,
    pageid: String,
    dragableCss: Object
  },
  setup (props: any, context: any) {
    const container = new Container(props, context, useStore())
    onMounted(() => console.log('container'))
    return {
      ...container.setup()
    }
  }
}

</script>
